package com.hzins.scher.core;

import java.util.Map;

import com.google.common.collect.Maps;

public class JobTarget {

	private String targetBeanName;
	private String targetMethodName;
	private Map<String, Object> methodParameters = Maps.newHashMap();

	private JobTarget() {
	}

	private JobTarget(String targetBeanName, String targetMethodName) {
		this.targetBeanName = targetBeanName;
		this.targetMethodName = targetMethodName;
	}

	private JobTarget(String targetBeanName, String targetMethodName,
			Map<String, Object> methodParameters) {
		this.targetBeanName = targetBeanName;
		this.targetMethodName = targetMethodName;
		this.methodParameters = methodParameters;
	}
	
	public String getTargetBeanName() { 
		return this.targetBeanName; 
	}

	public void setTargetBeanName(String targetBeanName) { 
		this.targetBeanName = targetBeanName; 
	}

	public String getTargetMethodName() { return this.targetMethodName; }

	public void setTargetMethodName(String targetMethodName) { this.targetMethodName = targetMethodName; }


	public Map<String, Object> getMethodParameters() { return this.methodParameters; }

	public void setMethodParameters(Map<String, Object> methodParameters) { this.methodParameters = methodParameters; }

	public static JobTarget of(String targetBeanName, String targetMethodName) { 
		return new JobTarget(targetBeanName, targetMethodName); }

	public static JobTarget of(String targetBeanName, String targetMethodName, Map<String, Object> methodParameters) { 
		return new JobTarget(targetBeanName, targetMethodName, methodParameters);
	}
}
